package com.cmnit.analysis.application

import java.util.Date

import com.cmnit.analysis.common.TApplication
import com.cmnit.analysis.controller.CardIssueController
import com.cmnit.analysis.util.ServiceUtil
import org.apache.log4j.Logger


object CardIssueApplication extends TApplication {
  val logger: Logger = Logger.getLogger(this.getClass)
  private val controller = new CardIssueController

  def run(acctTime: String): Unit = {
    start("CardIssue") {
      if(acctTime.isEmpty)
        controller.controller(ServiceUtil.getLastHourAcctTime(new Date))
      else
        controller.controller(acctTime)
    }
  }
}
